package com.larry.spark.rdd.instance

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object Spark01_RDD_Instance_Memory {

  def main(args: Array[String]): Unit = {
    //TODO  使用spark

    val conf = new SparkConf().setMaster("local").setAppName("WordCount")
    val sc = new SparkContext(conf)

    //从内存中创建RDD
    val rdd:RDD[Int] = sc.parallelize(
      Seq(1, 2, 3, 4)
    )

    val rdd1 = sc.makeRDD(
      Seq(1, 2, 3, 4)
    )

    sc.stop()
  }


}
